define(["jquery", "easy-admin"], function ($, ea) {

    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'supply.quoted/index',
        import_url: 'supply.quoted/import',
        receive_url: 'supply.quoted/receive',
    };

    var Controller = {

        index: function () {

            ea.table.render({
                init: init,
				toolbar:['refresh', 'import'],
                cols: [[
                    { type: "checkbox", width: 50 },
                    { field: 'id', width: 60, title: 'ID', sort: true, search:false},
                    { field: 'product_id', title: '产品id' ,width: 100},   
                    { field: 'specs', title: '规格' ,width: 100},   
                    { field: 'price', title: '价格' ,width: 100},   
					{ field: 'company_id', title: '厂家id' ,width: 100},   
					{ field: 'admin_id', title: '用户id' ,width: 120},  
                    { field: 'create_time',  title: '创建时间',width: 160,search:false},
					{ field: 'update_time',  title: '修改时间',width: 160,search:false},
					{ field: 'status', title: '状态' ,width: 100},
					// {
					// 	width: 100,
					// 	title: '操作',
					// 	align: "center",
					// 	fixed: 'right',
					// 	templet: ea.table.tool,
					// 	operat: [
					// 		'receive'
					// 	]
					// }
                ]],
            });

            ea.listen();
        },
        add: function () {
            ea.listen();
        },
        edit: function () {
            ea.listen();
        },
        import: function () {
            ea.listen();
        }
    };
    return Controller;
});